file(GLOB afe_srcs "./afe/*.cc")
file(GLOB audio_srcs "./audio/*.cc")
file(GLOB button_srcs "./button/*.cc")
file(GLOB display_srcs "./display/*.cc")
file(GLOB display_font_srcs "./display/fonts/*.c")
file(GLOB iot_srcs "./iot/*.cc")
file(GLOB iot_things_srcs "./iot/things/*.cc")
file(GLOB network_srcs "./network/src/*.cc")
file(GLOB ota_srcs "./ota/*.cc")
file(GLOB protocols_srcs "./protocols/*.cc")
file(GLOB system_srcs "./system/*.cc")
file(GLOB wifi_connect_srcs "./wifi_connect/*.cc")

set(src_files
    ${afe_srcs}
    ${audio_srcs}
    ${button_srcs}
    ${display_srcs}
    ${display_font_srcs}
    ${iot_srcs}
    ${iot_things_srcs}
    ${network_srcs}
    ${ota_srcs}
    ${protocols_srcs}
    ${system_srcs}
    ${wifi_connect_srcs}
)

set(include_dirs
            afe
            audio
            button
            display
            display/fonts
            iot
            network/inc
            ota
            protocols
            system
            wifi_connect/inc
            )

set(embed_files
            "audio/assert/err_reg.p3"
            "audio/assert/err_pin.p3"
            "audio/assert/wificonfig.p3"
            "audio/assert/upgrade.p3"
            "wifi_connect/assert/wifi_configuration.html"
            "wifi_connect/assert/wifi_configuration_done.html"
            )

set(requires
            board
            main
            opus
            opus-wrapper
            driver
            esp_timer
            esp_wifi
            esp_http_server
            esp_http_client
            mqtt
            nvs_flash
            esp_lcd
            lvgl__lvgl
            json
            espressif__esp-sr
            app_update
            button
            )

set(priv_requires
            )

idf_component_register(SRCS ${src_files}
                       INCLUDE_DIRS ${include_dirs}
                       EMBED_TXTFILES ${embed_files}
                       REQUIRES ${requires}
                       PRIV_REQUIRES ${priv_requires}
)
